package com.betterjr.modules.risk.loan.data;

import com.betterjr.modules.risk.loan.dao.FillAgreementInterfaces;
import com.betterjr.modules.risk.loan.entity.LoanProjectElcAgreement;
import com.betterjr.modules.risk.loan.entity.LoanProjectRelation;

public class AccountRegulatoryFillAgreement implements FillAgreementInterfaces {

    private String flag = LoanProjectElcAgreementConstantCollections.ELCAGREEMENT_TYPE_ACCOUNTREGULATORY;

    @Override
    public boolean fillAgreement(LoanProjectRelation anLoan, LoanProjectElcAgreement anAgreement) {

        if (anLoan != null && anAgreement != null && flag.equals(anAgreement.getType())) {

            anLoan.setAccountRegulatoryAgreement(anAgreement);
            return true;
        }

        return false;
    }

}
